<%-- 
    Document   : StaffInfo
    Created on : Apr 28, 2012, 5:00:07 PM
    Author     : Admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Thông tin cán bộ</title>
        <link rel="stylesheet" type="text/css" href="CSS/default.css" >
        <script src="CSS/stuHover.js" type="text/javascript"></script>
        <script type="text/javascript" src="CSS/jquery-latest.js"></script>
        <script type="text/javascript" src="banner_images/swfobject.js"></script>
    </head>


<body>

    <!-- Banner -->
    <div class="top">
	<div class="header">
		<div class="left">
                     <div align="center">
    <div id="flashcontent">
        <script type="text/javascript">
            var so = new SWFObject("banner_images/banner.swf", "mymovie", "900", "250", "8");
            so.addParam("menu", "false");
            so.write("flashcontent");
        </script>
    </div>
                   </div>
		</div>
	</div>
    </div>


   <div class="container">
        <!-- Tab Menu-->
        <div class="menu">
            <div class="navigation">
		<a href="Home.htm">Trang chủ</a>
		<a href="Search.htm">Tìm kiếm</a>
                <% if( request.getSession().getAttribute("roleManager") != null){%>
                <a href="ManageStaff.htm">Quản lý cán bộ</a>
                <a href="Report.htm">Báo cáo</a>
                <%}%>
                <% if( request.getSession().getAttribute("roleAdmin") != null){%>
                <a href="AdminManageInstitute.htm">Quản lý Viện</a>
                <a href="AdminManageStaff.htm">Quản lý Lãnh đạo viện</a>
                <a href="AuthorityChooseInstitute.htm">Phân quyền</a>
                <a href="Report.htm">Báo cáo</a>
                <%}%>
            </div>
        </div>
        <!-- End tab menu-->

   <!-- Main content & Right Menu -->
   <div class="main">
    <!-- Begin main content-->
    <div class="content">
        <div id="content">
            <h3>${title}</h3>
            <br/>
            <!--Học vị-->
            <c:if test="${(dbhvList != null) || (dbhhList != null)}">
                <% if( request.getSession().getAttribute("roleManager") != null){%>
                <a href="AddStaffInfo.htm?addId=1&id=${soyeu.idsoyeulylich}">Thêm diễn biến Học vị</a>
                <%}%>
                <br/><br/>
            <table width="400">
            
                    <thead>
                        <tr>
                            <th height="30" id="head">Học vị</th>
                            <th id="head">Năm phong</th>
                            <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <th id="head"></th>
                            <th id="head"></th>
                            <%}%>
                        </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${dbhvList}" var="dbhv">
                    <tr bgcolor ="#CCD8E0" >
                        <td class="detail">${dbhv.hocvi.ten}</td>
                        <td class="detail"> ${dbhv.namphong}</td>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                        <td class="detail"><a href="EditStaffInfo.htm?editId=1&iddbhv=${dbhv.iddienbienhocvi}&id=${soyeu.idsoyeulylich}">Sửa</a></td>
                        <td class="detail"><a href="DeleteStaffInfo.htm?deleteId=1&iddbhv=${dbhv.iddienbienhocvi}&id=${soyeu.idsoyeulylich}">Xóa</a> </td>
                        <%}%>
                    </tr>
                    </c:forEach>
                    </tbody>           
            </table>
            <br/><br/>

            <!--Học hàm-->
            <% if( request.getSession().getAttribute("roleManager") != null){%>
            <a href="AddStaffInfo.htm?addId=2&id=${soyeu.idsoyeulylich}">Thêm diễn biến Học hàm</a>
            <%}%>
            <br/><br/>
            <table width="600">
                    <thead>
                        <th height="30" id="head">Học hàm</th>
                        <th id="head">Chuyên ngành</th>
                        <th id="head">Năm phong</th>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <th id="head"></th>
                            <th id="head"></th>
                        <%}%>
                    </thead>
                    <tbody>
                    <c:forEach items="${dbhhList}" var="dbhh">
                        <tr bgcolor ="#CCD8E0" >
                            <td class="detail">${dbhh.hocham.ten}</td>
                            <td class="detail">${dbhh.chuyennganh}</td>
                            <td class="detail">${dbhh.namphong} </td>
                            <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <td class="detail"><a href="EditStaffInfo.htm?editId=2&iddbhh=${dbhh.iddienbienhocham}&id=${soyeu.idsoyeulylich}">Sửa</a></td>
                            <td class="detail"><a href="DeleteStaffInfo.htm?deleteId=2&iddbhh=${dbhh.iddienbienhocham}&id=${soyeu.idsoyeulylich}">Xóa</a> </td>
                            <%}%>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
           </c:if>

            <!-- Quá trình nghiên cứu-->
            <c:if test="${(qtnnList != null)}">
                <% if( request.getSession().getAttribute("roleManager") != null){%>
                <a href="AddStaffInfo.htm?addId=3&id=${soyeu.idsoyeulylich}">Thêm diễn biến Quá trình nghiên cứu</a>
                <%}%>
                <br/><br/>
                <table width="650">
                    <thead>
                        <th height="30" id="head">Tên đề tài</th>
                        <th id="head">Từ ngày</th>
                        <th id="head">Đến ngày</th>
                        <th id="head">Cơ quan chủ trì</th>
                        <th id="head">Ngày nghiệm thu</th>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <th id="head"></th>
                            <th id="head"></th>
                        <%}%>
                    </thead>
                    <tbody>
                    <c:forEach items="${qtnnList}" var="qtnn">
                    <tr bgcolor ="#CCD8E0" >
                        <td class="detail">${qtnn.tendetai}</td>
                        <td class="detail"><fmt:formatDate pattern="dd-MM-yyyy" value="${qtnn.tungay}"/></td>
                        <td class="detail"> <fmt:formatDate pattern="dd-MM-yyyy" value="${qtnn.denngay}"/> </td>
                        <td class="detail">${qtnn.coquanchutri}</td>
                        <td class="detail"><fmt:formatDate pattern="dd-MM-yyyy" value="${qtnn.ngaynhiemthu}"/></td>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <td class="detail"><a href="EditStaffInfo.htm?editId=3&idqtnn=${qtnn.idquatrinhnghiencuu}&id=${soyeu.idsoyeulylich}">Sửa</a></td>
                            <td class="detail"><a href="DeleteStaffInfo.htm?deleteId=3&idqtnn=${qtnn.idquatrinhnghiencuu}&id=${soyeu.idsoyeulylich}">Xóa</a> </td>
                        <%}%>
                    </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </c:if>

            <!-- Quá trình đi nước ngoài-->
            <c:if test="${qtdnnList != null}">
                <% if( request.getSession().getAttribute("roleManager") != null){%>
                <a href="AddStaffInfo.htm?addId=4&id=${soyeu.idsoyeulylich}">Thêm diễn biến Quá trình đi nước ngoài</a>
                <%}%>
                <br/><br/>
                <table width="650">
                    <thead>
                        <th height="30" id="head">Mục đích</th>
                        <th id="head">Quốc gia</th>
                        <th id="head">Từ ngày</th>
                        <th id="head">Đến ngày</th>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <th id="head"></th>
                            <th id="head"></th>
                        <%}%>
                    </thead>
                    <tbody>
                    <c:forEach items="${qtdnnList}" var="qtdnn">
                    <tr bgcolor ="#CCD8E0" >
                        <td class="detail">${qtdnn.mucdich}</td>
                        <td class="detail">${qtdnn.quocgia.ten}</td>
                        <td class="detail"><fmt:formatDate pattern="dd-MM-yyyy" value="${qtdnn.tungay}"/></td>
                        <td class="detail"> <fmt:formatDate pattern="dd-MM-yyyy" value="${qtdnn.denngay}"/> </td>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <td class="detail"><a href="EditStaffInfo.htm?editId=4&idqtdnn=${qtdnn.idquatrinhdinuocngoai}&id=${soyeu.idsoyeulylich}">Sửa</a></td>
                            <td class="detail"><a href="DeleteStaffInfo.htm?deleteId=4&idqtdnn=${qtdnn.idquatrinhdinuocngoai}&id=${soyeu.idsoyeulylich}">Xóa</a></td>
                        <%}%>
                    </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </c:if>

            <!-- Diễn biến lương-->
            <c:if test="${dblList != null}">
                <% if( request.getSession().getAttribute("roleManager") != null){%>
                <a href="AddStaffInfo.htm?addId=5&id=${soyeu.idsoyeulylich}">Thêm diễn biến lương</a>
                <%}%>
                <br/><br/>
                <table width="650">
                    <thead>
    
                        <th id="head" height="30">Từ ngày</th>
                        <th id="head">Đến ngày</th>
                        <th id="head">Hệ số lương</th>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <th id="head"></th>
                            <th id="head"></th>
                        <%}%>
                    </thead>
                    <tbody>
                    <c:forEach items="${dblList}" var="dbl">
                    <tr bgcolor ="#CCD8E0" >                   
                        <td class="detail"><fmt:formatDate pattern="dd-MM-yyyy" value="${dbl.tungay}"/></td>
                        <td class="detail"> <fmt:formatDate pattern="dd-MM-yyyy" value="${dbl.denngay}"/> </td>
                        <td class="detail">${dbl.hesoluong.heso}</td>
                        <% if( request.getSession().getAttribute("roleManager") != null){%>
                            <td class="detail"><a href="EditStaffInfo.htm?editId=5&iddbl=${dbl.iddienbienluong}&id=${soyeu.idsoyeulylich}">Sửa</a></td>
                            <td class="detail"><a href="DeleteStaffInfo.htm?deleteId=5&iddbl=${dbl.iddienbienluong}&id=${soyeu.idsoyeulylich}">Xóa</a></td>
                        <%}%>
                    </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </c:if>
         </div>
    </div>
    <!-- End main content -->

    <!-- Right menu-->
    <div class="sidenav">

      <% if( request.getSession().getAttribute("userName") == null){%>
      <form method="POST" action="Login.htm" >
      <h2>Đăng nhập</h2>
      <br/>
      <a>Tài khoản
          <input type="text" name="username" size="15" id="dangnhap"/>
      </a> <br/><br/>
      <a>Mật khẩu
          <input type="password" name="password" size="15" id="dangnhap"/>
          ${error}
      </a> <br/><br/>
      <input type="submit" value="Đăng nhập" /><br/><br/>
      </form>
      <%}else {%>
      <h2>Tài khoản</h2>
      <c:if test="${isStaffLogin == true}">
      <li><a href="StaffProfile.htm?username=${sessionScope['userName']}">Xin chào ${sessionScope['userName']}!</a></li>
      <li><a href="StaffInfo.htm?viewId=1&id=${sessionScope['idSoyeu']}">Diễn biến Học hàm, Học vị</a></li>
      <li><a href="StaffInfo.htm?viewId=2&id=${sessionScope['idSoyeu']}">Quá trình nghiên cứu</a> </li>
      <li><a href="StaffInfo.htm?viewId=3&id=${sessionScope['idSoyeu']}">Quá trình đi nước ngoài</a> </li>
      <li><a href="StaffInfo.htm?viewId=4&id=${sessionScope['idSoyeu']}">Diễn biến lương</a> </li>
      <li><a href="logout.htm">Thoát</a></li>
      </c:if>

      <c:if test="${isStaffLogin == false}">
        <li><a href="StaffProfile.htm?username=${soyeu.tendangnhap}"> Thông tin của ${soyeu.hoten}</a></li>
        <li><a href="StaffInfo.htm?viewId=1&id=${soyeu.idsoyeulylich}">Diễn biến Học hàm, Học vị</a></li>
        <li><a href="StaffInfo.htm?viewId=2&id=${soyeu.idsoyeulylich}">Quá trình nghiên cứu</a> </li>
        <li><a href="StaffInfo.htm?viewId=3&id=${soyeu.idsoyeulylich}">Quá trình đi nước ngoài</a> </li>
        <li><a href="StaffInfo.htm?viewId=4&id=${soyeu.idsoyeulylich}">Diễn biến lương</a> </li>
      </c:if>
      <%}%>

      <h2> Danh Sách Viện </h2>
           <ul id="accordion">
	<li>Viện Nghiên Cứu</li>
	<ul>
		<c:forEach items="${dvqlList1}" var="dvql">
                    <li><a href="Institute.htm?iddvql=${dvql.iddonviquanly}">${dvql.ten}</a></li>
                </c:forEach>
	</ul>
	<li>Đơn Vị Hành Chính</li>
	<ul>
		<c:forEach items="${dvqlList2}" var="dvql">
                    <li><a href="Institute.htm?iddvql=${dvql.iddonviquanly}">${dvql.ten}</a></li>
                </c:forEach>
	</ul>
        </ul>

      <h2> Giới thiệu theo yêu cầu </h2>
      <ul><a href="#"><img src="images/gioithieu/thuviensoad.gif" width="190"/> </a> </ul>
      <ul><a href="#"><img src="images/gioithieu/nxb_khtn&cn.jpg" width="190"/> </a> </ul>
      <ul><a href="#"><img src="images/gioithieu/thietbinghiencuu.jpg" width="190"/> </a> </ul>
      <ul><a href="#"><img src="images/gioithieu/baotangthiennhienvn.gif" width="190"/> </a> </ul>
      <ul><a href="#"><img src="images/gioithieu/baotanghaiduong.jpg" width="190"/> </a> </ul>

    </div>
    <!-- End Right Menu-->

    <div class="clearer"><span></span></div>
    </div>
    <!-- End Main content & Right Menu -->

    <!-- Footer -->
    <div class="footer">
    </div>
    <!-- End Footer -->

    </div>
   </body>
   <SCRIPT>
$("#accordion > li").click(function(){

	if(false == $(this).next().is(':visible')) {
		$('#accordion > ul').slideUp(300);
	}
	$(this).next().slideToggle(300);
});

$('#accordion > ul:eq(0)').show();

</SCRIPT>
</html>


